package org.q.threads;

public class ThreadImplements implements Runnable {

	@Override
	public void run() {
		
		if(Thread.interrupted()) {
			System.out.println(this.getClass().getSimpleName()+" interrupted ... ");
//			Thread.yield();
		}
		
		try {
			for(int i=0;i<100;i++) {
				Thread.sleep(1000);
				System.out.println(this.getClass().getName() + "," + Thread.currentThread().getName() + ": "+i+" ...");
			}
		} catch (InterruptedException e) {
			System.out.println(e.getMessage()+", is interrupted : " + Thread.currentThread().isInterrupted());
//			return ;
		}
	}
	
}
